﻿using CatUtils.Utils.Currency.TextUtils;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ArticleContentCreate.WebSite.LocalMode
{
    internal class PropagandaTool
    {
        public void CreatePublishAD(string FloderPath)
        {
            CreateUrlFile("https://acg12.com/", "动漫资源库", FloderPath);
            CreateUrlFile("https://dmtu.net/", "在线图库", FloderPath);
        }

        public void CreateUrlFile(string Url, string FileName, string FloderPath)
        {
            CreateUrlFile(Url, FloderPath + TextHelper.ReplaceBadChar(FileName) + ".url");
        }

        public void CreateUrlFile(String Url, string FilePath)
        {
            string Content = string.Format("[InternetShortcut]\r\nURL={0}\r\n", Url);
            Console.WriteLine(Content);
            File.WriteAllText(FilePath, Content, Encoding.Default);
        }
    }
}